/**
 * 新用户专享活动相关接口 
 */
var request = require('./request.js');
module.exports = {
  /**
   * 查询指定门店的新用户专享活动列表 
   * @param storeId 门店Id
   */
  getAll: function(storeId) {
    var params = {
      storeId: storeId
    }
    return request.get('/newretail/api/mall/newmbrActivity/getAll', params)
  },
  /**
   * 根据活动Id和商品Id查询具体的门店范围
   * @param {*} activityId 
   * @param {*} productId 
   */
  getNewmbrProductScope: function(activityId, productId) {
    var params = {
      activityId: activityId,
      productId: productId
    }
    return request.get('/newretail/api/mall/newmbrActivity/getNewmbrProductScope', params)
  },
  /**
   * 检查是否具有购买商品的资格
   * @param activityId 新用户专享活动Id
   * @param count 购买数量
   * @param productId 商品Id
   * @param storeId 门店Id
   */
  checkQualification: function(activityId, count, productId, storeId) {
    var params = {
      activityId: activityId,
      count: count,
      productId: productId,
      storeId: storeId
    }
    return request.get('/newretail/api/mall/newmbrActivity/checkQualification', params)
  }
}